# 逻辑运算符和表达式
a=-3
b=-5
# and 并且
# -3<0 and -5>0
res1=a<0 and b<0
print(res1)#True

res2=a<0 and b>0
print(res2)

res3=a < 0 and 1 / 2
        # -3 < 0 and 1 /2
print(res3)          #0.5

res4=a > 0 and 1 / 2
# -3 >0 and    短路
print(res4)  #False

res5= a >0 or b <0
print(res5)

res6=a> 0 or b>0
print(res6)

res7=a <0 or 1/2
#    -3<0 or   短路
print(res7)

res8=a>0 or 1/2
     # -3>0 or 1/2
print(res8)